package com.example.demo.test;


public class demo1 {

    public static void main(String[] args) {
        //System.out.println(getValue());
        //System.out.println(getValue2());
        char a = '好';
        System.out.println(a);
    }

    //无异常情况
    public static String getValue(){
        try{
            int i = Integer.hashCode(1);
            System.out.println(1);

            Object o = new Object();
            return "A";
        }catch (Exception e){
            return "B";
        }finally {
            return "C";
        }
    }
    //有异常情况
    public static String getValue2(){
        try{
            System.out.println(1/0);
            return "A";
        }catch (Exception e){
            return "B";
        }finally {
            return "C";
        }
    }


}
